package com.hgt.springcloud.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: huanggaotao
 * @Description:
 * @Date: Created in 17:52 2021/6/17
 * @Modified By:
 */
@RestController
public class OrderConsulController {

    public static final String INVOKE_URL="http://consul-provider-payment";

    @Autowired
    private RestTemplate restTemplate;


    @GetMapping("/consumer/payment/consul")
    public String paymentInfo(){
        return  restTemplate.getForObject(INVOKE_URL+"/payment/consul",String.class);
    }

}
